<ion-view view-title={{moduleTitle}} cache-view="false">
    <ion-nav-buttons side="left">
        <a class="button button-icon ion-arrow-left-c" ng-click="goBack()"></a>
    </ion-nav-buttons>
    <div class="tabs-striped tabs-top">
        <div class="tabs">
            <a ng-if="access.list" ng-class="{'tab-item':true,'active': id }" href="#/{{moduleName}}/list">查看</a>
            <a ng-if="access.add" ng-class="{'tab-item':true,'active': !id }" href="#/{{moduleName}}/0">添加</a>
            <a ng-if="access.stats" ng-class="{'tab-item':true,'active': false }" href="#/{{moduleName}}/stats">统计</a>
        </div>
    </div>
    <ion-content class="padding has-tabs-top">
        <form name="detailForm" novalidate="" ng-submit="submitForm(detailForm)">
            <div class="list">
                <insert-address form="detailForm" addressoption="addressOption"></insert-address>
                <insert-date form="detailForm" dateoption="dateOption"></insert-date>
                <insert-select form="detailForm" option="brandOption"></insert-select>
                <label class="item item-input">
                    <span class="input-label">销售量(万吨)<span style="color:red">*</span>：</span>
                    <input type="text" name="sales" ng-model="detail.sales"
                           required
                           ng-pattern='/^\d{1,8}([\.]\d{0,2})?$/'
                           ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }">
                </label>
                <!-- Error Container for Password -->
                <div class="validation-error" ng-class="{'is-dirty':form.password.$dirty}"
                     ng-messages="detailForm.sales.$error" role="alert">
                    <div ng-messages-include="templates/system-templates/detail-errors.html"></div>
                </div>
            </div>
            <button class="button button-full button-positive" ng-disabled="detailForm.$invalid || detailEdit.editDisabled" type="submit">
                {{operation}}
            </button>
        </form>
    </ion-content>
    <!--头部和内容结束-->
</ion-view>